<?php
/**
 * Created by PhpStorm.
 * User: gm
 * Date: 2018/12/11
 * Time: 11:06
 */
include "config.php";
include "status.php";
if(isset($_REQUEST["uname"])){
    $UNAME=$_REQUEST["uname"];
    $sql="SELECT * FROM userinfo WHERE u_name=?;";
    $stmt=$conn->prepare($sql);
    $stmt->bind_param("s",$UNAME);
    $stmt->execute();
    $result=$stmt->get_result();
    if($result->num_rows>=1){
        print_r("false");
    }else{
        print_r("true");
    }
    $stmt->close();
    $conn->close();
}else{
    print_r(json_encode(Status::$no_key));
}



